<?python
  layout_params['pageType'] = 'problems by phase'
?>
<html py:layout="'layout.kid'" xmlns:py="http://purl.org/kid/ns#">

<body>

<div py:match="item.get('id') == 'content'" id="content">

<h2>Problems by phase</h2>

<div py:for="phase,data in rep.getProblemsByPhase()" py:strip="True">
<h3>$phase</h3>

<table>
<thead>
<tr>
  <th class="type">Type</th>
  <th class="details">Details</th>
  <th class="ndocs">N</th>
  <th class="docs">Documents</th>
</tr>
</thead>
<tbody>
<tr py:for="msg in data" class="${msg['level'].lower()}">
  <td class="type">${msg['type']}</td>
  <td class="details">${msg['details']}</td>
  <td class="ndocs">${msg['ndocs']}</td>
  <td class="docs">
    <ul>
      <li class="doc" py:for="doc in msg['docs']">
        <a href="doc_${doc['id']}.html">${doc['title']}</a>
      </li>
    </ul>
  </td>
</tr>
</tbody>
</table>

</div>

</div>

</body>

</html>